The invention relates to multi-user distributed process systems having a master process and a plurality of service processes and a method for adapting applications written for a single user environment for use in the multi-user system without recompiling.
The distributed process system described is a multi-user and multi-tasking system. Applications written for a multi-user environment typically assume that more than one copy of the application may be active at the same time. Multi-tasking operating systems (Windows NT and Unix for example) provide the capability to create various types of shared objects for providing interprocess communications and synchronization. By associating a name with an object, it allows for one process to create an object and for another process to make use of it. Synchronization ensures that only one process has control of a resource at a time. Resources include objects such as global variables, common data memory, file handles, and shared object handles.
Shared objects used for synchronization and interprocess communication include:
Semaphores and event objects for coordinating threads;
Mutexes, a mutually exclusive semaphore allowing a single thread access at a time;
Named Pipes for duplexed interprocess and interprocessor connection;
Message Queues for one way, many to one communications; and
Shared Memory for use by all processes that have authorized access.
If an application was written for a single user for running under a single user operating system, such as Windows NT (produced by Microsoft Corp. of Redmond, Wash.), and then is run in a multi-user environment under a compatible multi-user operating system, such as WinFrame(trademark) (produced by Citrix Systems, Inc. of Coral Springs, Fla.), in a multi-user environment, it is possible for name collisions to occur if more than one copy of the same application is executed at the same time. The application would have to be modified and recompiled in order for it to execute reliably in the multi-user environment.
The present invention modifies the existing methods used for object name creation, look-up, and deletion in a multi-user operating system so that multiple copies of a single user application are able to run simultaneously.
A method is described for allowing a single-user application program to operate in a multi-user operating system without modification of the single-user program by modifying existing operating system methods used for object name creation, look-up, and deletion, so that multiple copies of a single-user application program are able to run simultaneously.
The method includes the following steps:
a) assigning a unique identifier to each user on the system and each of the user""s applications, and attaching this same identifier to each instance of an object created by the user""s applications, for the purpose of creating a distinct single user name space that is only accessible by the same single user; and
b) enabling a server process that is serving the application of the single user process to impersonate the single user process by assuming the identity of the single user process, for allowing the server process to access the single user name space.
In this manner, the server process assumes the role of the user, has access to the user""s private name space and to all objects required for serving the user""s application. The combination of user labeling and user impersonation allows multiple copies of a given application to run simultaneously even though the application was written for a single-user operating system.